<?php
	$mode=$_GET['mode'];
	$obj=new Support();
	$obj->SupportID=$_POST['SupportID'];
	$obj->DepartmentName=$_POST['DepartmentName'];
	$obj->Nick=$_POST['Nick'];
	$obj->ChatPro=$_POST['ChatPro'];
	$obj->Pos=$_POST['Pos'];
	
	if($mode=="add")
	{
		echo "test";
		$obj->insert($conn);
	}
	if($mode=="update")
	{
		$obj->update($conn);
	}
	if($mode=="del")
	{
		$obj->SupportID=$id;
		$obj->delete($conn);
	}
	$url="?module=$module";
	echo "<script language='JavaScript'> window.location = '".$url."'</script>";
?>